using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Domain.Erp;

/// <summary>
/// erp-入库商品详细
/// </summary>
[SugarTable("erp_instock_product")]
public class ErpInstockProduct:Entity
{
    /// <summary>
    /// 入库编号
    /// </summary>
    [Required]
    public long InStockId { get; set; }
    
    /// <summary>
    /// 仓库信息
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(InStockId))]
    public ErpInstock InStock { get; set; }
    
    /// <summary>
    /// 仓库编号
    /// </summary>
    [Required]
    public long WarehouseId { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    [Required]
    public long ProductId { get; set; }

    /// <summary>
    /// 入库数量
    /// </summary>
    [Required]
    public int Count { get; set; } = 0;
    
    /// <summary>
    /// 入库数量-出库数量值
    /// </summary>
    [Required]
    public int OutCount { get; set; } = 0;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;


}